﻿@model VNWIKI_WEB.Models.DataList
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section title {
    @if (ViewData["catName"] != null){ 
        @ViewData["catName"] //| Chia sẻ hình ảnh đẹp - vnwiki.com
    }
    @if (ViewData["key"] != null){ 
        @ViewData["key"] //| Chia sẻ hình ảnh đẹp - vnwiki.com
    }
}
@section categoryList {
    @{foreach (var pt in Model.CatList)
      { 
        <li><a href="@Url.RouteUrl("CategoryView", new { catID = pt.ID })">@pt.Name</a>
        </li>
    } }
}
@section content {
    <div class="slider">
        <div class="border">
            <div class="info">
                @if (ViewData["catName"] != null)
                              { 
                    <h2>
                        <strong>Thể loại: <span style="color: #02a0cd">@ViewData["catName"]</span></strong></h2>
                            }
                @if (ViewData["key"] != null)
                              { 
                    <h2>
                        Kết quả tìm kiếm cho "<span style="color: #02a0cd">@ViewData["key"]</span>"</h2>
                            }
                <span>Có tất cả: <b>@ViewData["albumNum"] Album</b></span>
            </div>
            <div class="views">
            </div>
        </div>
    </div>
    <div class="album-list">
        @{foreach (var pt in Model.AlbumList)
                  { 
            <div class="album">
                <div class="gray">
                    <div class="album-image">
                        <a href="@Url.RouteUrl("AlbumView", new { category_id = pt.CatId, album_id = pt.Id, index = "0" })"><img alt="" src="../images/@pt.Image" /></a>
                    </div>
                    <div class="album-info">
                        <span style="display: block; margin-left: 10px; margin-top: 5px; clear: both">
                            <h4>
                                 @Html.RouteLink(pt.Name, "AlbumView", new { category_id = pt.CatId, album_id = pt.Id, index = "0" })<span style="font-weight: normal; color: #1C7EE9">(@pt.PhotoNum)</span></h4>
                        </span><span style="display: block; margin-left: 10px; float: left; font-size: 12px">
                            Gửi bởi: <b>@pt.UserName</b></span> <span style="display: block; margin-right: 10px;
                                float: right">
                                <img src="../images/3star.png" width="70" height="13" alt="star" />
                            </span>
                    </div>
                </div>
            </div> 
                    } }
    </div>
    <div id="fb-root">
    </div>
    <script>        (function (d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        } (document, 'script', 'facebook-jssdk'));</script>
}
